package com.ttdc.service;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.ttdc.pojo.User;
import com.ttdc.pojo.UserExample;

public interface UserService {  
	
    //根据账号和密码判断是否存在该用户
	public int selectByNamePassword(String name, String password);

	
	// 判断用户名是否已注册 
	public boolean userRegister(String username);
	
	
	//已经判断该用户名，现注册该用户

	public int userInsert(User user);
	

	//根据用户名获得该用户名对应的id

	public List<User> selectByNameForId(String name);
	
	 List<User> selectByAll(Integer roleId);
	
    int selectByRoleId(Integer roleId);
    
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    List<User> selectByAll();
    


	
} 